//
//  UIView+Extension.m
//  XZ_WeChat
//
//  Created by 郭现壮 on 16/2/17.
//  Copyright © 2016年 XianZhuangGuo. All rights reserved.
//

#import "UIView+Extension.h"

@implementation UIView (Extension)

-(void)setXx:(CGFloat)xx
{
    CGRect frame = self.frame;
    frame.origin.x = xx;
    self.frame = frame;
}

- (void)setYy:(CGFloat)yy
{
    CGRect frame = self.frame;
    frame.origin.y = yy;
    self.frame = frame;
}

- (CGFloat)xx
{
    return self.frame.origin.x;
}

- (CGFloat)yy
{
    return self.frame.origin.y;
}


- (CGFloat)Left
{
    return self.frame.origin.x;
}

- (void)setLeft:(CGFloat)Left
{
    CGRect frame = self.frame;
    frame.origin.x = Left;
    self.frame = frame;
}

- (CGFloat)Top
{
    return self.frame.origin.y;
}

- (void)setTop:(CGFloat)Top
{
    CGRect frame = self.frame;
    frame.origin.y = Top;
    self.frame = frame;
}

- (CGFloat)rightHT {
    return self.frame.origin.x + self.frame.size.width;
}

- (void)setRightHT:(CGFloat)rightHT {
    CGRect frame = self.frame;
    frame.origin.x = rightHT - frame.size.width;
    self.frame = frame;
}

- (CGFloat)bottomM {
    return self.frame.origin.y + self.frame.size.height;
}

- (void)setBottomM:(CGFloat)bottomM {
    CGRect frame = self.frame;
    frame.origin.y = bottomM - frame.size.height;
    self.frame = frame;
}

- (CGFloat)widthH {
    return self.frame.size.width;
}

- (void)setWidthH:(CGFloat)widthH {
    CGRect frame = self.frame;
    frame.size.width = widthH;
    self.frame = frame;
}

- (CGFloat)heightHT {
    return self.frame.size.height;
}

- (void)setHeightHT:(CGFloat)heightHT {
    CGRect frame = self.frame;
    frame.size.height = heightHT;
    self.frame = frame;
}

- (CGPoint)originN {
    return self.frame.origin;
}
-(void)setOriginN:(CGPoint)originN
{
    CGRect frame = self.frame;
    frame.origin = originN;
    self.frame = frame;
}

- (CGSize)sizeE {
    return self.frame.size;
}
-(void)setSizeE:(CGSize)sizeE {
    CGRect frame = self.frame;
    frame.size = sizeE;
    self.frame = frame;
}

- (void)setCenterXx:(CGFloat)centerXx
{
    CGPoint center = self.center;
    center.x = centerXx;
    self.center = center;
}

- (CGFloat)centerXx
{
    return self.center.x;
}

- (void)setCenterYy:(CGFloat)centerYy
{
    CGPoint center = self.center;
    center.y = centerYy;
    self.center = center;
}

- (CGFloat)centerYy
{
    return self.center.y;
}


@end
